package com.googlecode.yami;

import java.sql.Connection;

import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JTextArea;

public class QueryComponent extends JComponent {

    Box box1;
    Box box2;
    JLabel statusBar = new JLabel("Version " + MainWindow.VERSION);

    // connect.java login() function sets this parameter after login
    static String whoIs;

    public QueryComponent(Connection srvConn) {
	box1 = Box.createVerticalBox();
	box1.add(new JTextArea());
	box2 = new Box(BoxLayout.X_AXIS);
	box1.add(box2);
	box2.add(Box.createHorizontalGlue());

	// filling it in getVersion.java within initializeBars
	statusBar.setVisible(true);
	box2.add(statusBar);
	box2.add(Box.createHorizontalStrut(10));

	// adding the new tab to the main Pane
	MainWindow.JTP.addTab("Browsing::" + whoIs, box1);
    }
}
